home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
nrpas13.arc
/
CHDER.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-05-01
|
479b
|
20 lines
PROCEDURE chder(a,b: real; c: glcarray; VAR cder: glcarray; n: integer);
(* Programs using routine CHDER must define the type glcarray
as in routine CHEBFT. *)
VAR
j: integer;
con: real;
BEGIN
cder[n] := 0.0;
cder[n-1] := 2*(n-1)*c[n];
IF (n >= 3) THEN BEGIN
FOR j := n-2 DOWNTO 1 DO BEGIN
cder[j] := cder[j+2]+2*j*c[j+1]
END
END;
con := 2.0/(b-a);
FOR j := 1 TO n DO BEGIN
cder[j] := cder[j]*con
END
END;